package com.example.demo.Controller;

//         佛祖保佑       永无BUG     永不修改

import com.example.demo.Service.userService;
import com.example.demo.pojo.UserDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private userService userService;


    @PostMapping(value = "/lgoin")
    public String login(String username){
        return userService.loginUser(username);

    }

    @PostMapping(value = "/setUser")
    public boolean setUser(UserDO userDO){
        return userService.setUser(userDO);
    }
}
